package com.hollysys.hollimsa.common.filter.tenantinfo;


/**
 * 命名空间
 *
 * @author wangyuxi
 */
public final class TenantInfoContext {

    private TenantInfoContext() {
    }

    private static final ThreadLocal<TenantInfo> TENANT_INFO = new ThreadLocal<>();

    public static TenantInfo getTenantInfo() {
        return TENANT_INFO.get();
    }

    public static void setTenantInfo(TenantInfo tenantInfo) {
        TENANT_INFO.set(tenantInfo);
    }

    public static void remove() {
        TENANT_INFO.remove();
    }

    /**
     * 获取租户命名空间
     *
     * @return 命名空间
     */
    public static String getTenantNS() {
        return "default";
//        return getTenantInfo().getTenantName() + "-" + getTenantInfo().getProjectName();
    }


}
